package com.yuntu.entity;

import java.util.Date;

/**
 * @author MrWang-shuizhishuiheshui
 * @description 实体类 - 学生类
 */
public class Student {
    //映射表字段的属性
    private Integer studentNo;
    private String loginPwd;
    private String stuName;
    private String sex;
    private Integer gradeId;
    //java.util.Date(实体类中)
    private Date bornDate;
    private String identityCard;

    //添加一个年级对象
    private Grade grade;

    public Grade getGrade() {
        return grade;
    }

    public void setGrade(Grade grade) {
        this.grade = grade;
    }

    public Student(Integer studentNo, String loginPwd, String stuName, String sex, Integer gradeId, Date bornDate, String identityCard, Grade grade) {
        this.studentNo = studentNo;
        this.loginPwd = loginPwd;
        this.stuName = stuName;
        this.sex = sex;
        this.gradeId = gradeId;
        this.bornDate = bornDate;
        this.identityCard = identityCard;
        this.grade = grade;
    }

    @Override
    public String toString() {
        return "Student{" +
                "studentNo=" + studentNo +
                ", loginPwd='" + loginPwd + '\'' +
                ", stuName='" + stuName + '\'' +
                ", sex='" + sex + '\'' +
                ", gradeId=" + gradeId +
                ", bornDate=" + bornDate +
                ", identityCard='" + identityCard + '\'' +
                ", grade=" + grade.toString() +
                '}';
    }

    //构造方法
    public Student() {
    }

    public Student(Integer studentNo, String loginPwd, String stuName, String sex, Integer gradeId, Date bornDate, String identityCard) {
        this.studentNo = studentNo;
        this.loginPwd = loginPwd;
        this.stuName = stuName;
        this.sex = sex;
        this.gradeId = gradeId;
        this.bornDate = bornDate;
        this.identityCard = identityCard;
    }

    public Student(String loginPwd, String stuName, String sex, Integer gradeId, Date bornDate, String identityCard) {
        this.loginPwd = loginPwd;
        this.stuName = stuName;
        this.sex = sex;
        this.gradeId = gradeId;
        this.bornDate = bornDate;
        this.identityCard = identityCard;
    }
    //对外方法
    public Integer getStudentNo() {
        return studentNo;
    }

    public void setStudentNo(Integer studentNo) {
        this.studentNo = studentNo;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getGradeId() {
        return gradeId;
    }

    public void setGradeId(Integer gradeId) {
        this.gradeId = gradeId;
    }

    public Date getBornDate() {
        return bornDate;
    }

    public void setBornDate(Date bornDate) {
        this.bornDate = bornDate;
    }

    public String getIdentityCard() {
        return identityCard;
    }

    public void setIdentityCard(String identityCard) {
        this.identityCard = identityCard;
    }

}
